﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Practices.EnterpriseLibrary.Validation.Validators;
using Microsoft.Practices.EnterpriseLibrary.Validation;

namespace AsNum.Common.EntLib.Validation.CustomValidator {
    [AttributeUsage ( AttributeTargets.Property
        | AttributeTargets.Field
        | AttributeTargets.Method
        | AttributeTargets.Parameter ,
        AllowMultiple = true ,
        Inherited = false )]
    public class NotNullOrEmptyValidatorAttribute : ValidatorAttribute {

        protected override Validator DoCreateValidator(Type targetType) {
            return new NotNullOrEmptyValidator ( this.MessageTemplate , this.Tag );
        }
    }
}
